
#include "NadineFramework0316/NadineFramework/NadineLibrary/Nadine09.h"
#include "NDAmeliaMeshForCHC.h"

namespace Nadine
{
	//---------------------------------------------------------------------
	NDAmeliaMeshForCHC::NDAmeliaMeshForCHC(NDArk* pArk, NDAmelia* pAmelia, void* pMeshInstancePtr, NDVECTOR3& vScale, NDVECTOR3& vTranslation ):
		NDCHCSPGeometry(pArk, 0, -1), m_pAmelia(pAmelia), m_pMeshInstancePtr(pMeshInstancePtr), m_vScale(vScale), m_vTranslation(vTranslation)
	{
		this->setArk(pArk);

		NDVECTOR3 vC;
		NDVECTOR3 vHSZ;
		m_pAmelia->getMeshInstanceAABB( pMeshInstancePtr, vC, vHSZ );

		vHSZ.x *=vScale.x;
		vHSZ.y *=vScale.y;
		vHSZ.z *=vScale.z;

		vC.x +=(vTranslation.x);
		vC.y +=(vTranslation.y);
		vC.z +=(vTranslation.z);

		vC.x *=vScale.x;
		vC.y *=vScale.y;
		vC.z *=vScale.z;

		this->setBBOXInfo( vC, vHSZ );
			

	}

	//---------------------------------------------------------------------
	void NDAmeliaMeshForCHC::release()
	{
		this->m_bReleased =true;


	}

	//---------------------------------------------------------------------
	void NDAmeliaMeshForCHC::render(float fElapsedTime)
	{
		this->m_pAmelia->renderAmeliaMeshInsatnce( m_pMeshInstancePtr, m_vScale, m_vTranslation );


	}

	//---------------------------------------------------------------------
	void 	NDAmeliaMeshForCHC::setRotations(NDVECTOR3 vRotation)		{}
	void 	NDAmeliaMeshForCHC::setTranslation(NDVECTOR3 vTranslation)	{}
	void 	NDAmeliaMeshForCHC::setScale(NDVECTOR3 vScale)				{}
	void	NDAmeliaMeshForCHC::setTransformMatrix(NDMATRIX mMat)		{}

}